package com.wkq.move.module.main.ui.fragment

import android.os.Bundle
import android.view.View
import androidx.databinding.ViewDataBinding
import com.wkq.base.frame.fragment.MvpBindingFragment
import com.wkq.move.R
import com.wkq.move.databinding.FragmentTvListBinding
import com.wkq.move.module.main.frame.presenter.TvListPresenter
import com.wkq.move.module.main.frame.view.TvListView

/**
 *
 * 作者:吴奎庆
 *
 * 时间:2020/5/22
 *
 * 用途:
 */


class TvListFragment : MvpBindingFragment<TvListView, TvListPresenter, FragmentTvListBinding>() {
    var index :String? = null
    var startIndex :String? = null
    var totalIndex :String? = null

    companion object {
        fun newInstance(path: String): TvListFragment {
            var bandle: Bundle = Bundle()
            bandle.putString("path", path)
            var home: TvListFragment = TvListFragment()
            home.arguments = bandle
            return home

        }
    }

    override fun getLayoutId(): Int {
        return R.layout.fragment_tv_list
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
         index = arguments?.getString("path")
        startIndex = arguments?.getString("path")
        if (mvpView != null) mvpView.initView()
        if (getPresenter() != null) getPresenter().getData(index)
    }
}